-- GENERATED SPELL FOR [Onyxian Warder] --


function spell0_12129(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12129', 643, 1)
end

function spell1_12129(pUnit, Event) --@Fire Nova,Self--
pUnit:FullCastSpellOnTarget(20203,pUnit)
pUnit:RegisterEvent('Sorts_12129', 591, 1)
end

function spell2_12129(pUnit, Event) --@Flame Lash,n/a--
pUnit:FullCastSpellOnTarget(18958,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12129', 45289, 1)
end

function spell3_12129(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(12097,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12129', 20316, 1)
end

function Sorts_12129(pUnit, Event)
local choix_sorts_12129 = math.random(0, 3)
if choix_sorts_12129 == 0 then
pUnit:RegisterEvent('spell0_12129', 1, 1)
end
if choix_sorts_12129 == 1 then
pUnit:RegisterEvent('spell1_12129', 1, 1)
end
if choix_sorts_12129 == 2 then
pUnit:RegisterEvent('spell2_12129', 1, 1)
end
if choix_sorts_12129 == 3 then
pUnit:RegisterEvent('spell3_12129', 1, 1)
end
end

function mob12129_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12129', math.random(1500, 3000), 1)
end

function mob12129_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12129_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12129_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12129, 1, 'mob12129_Action')
RegisterUnitEvent(12129, 2, 'mob12129_Leave')
RegisterUnitEvent(12129, 3, 'mob12129_Kill')
RegisterUnitEvent(12129, 4, 'mob12129_Die')
